<?php
//1.
$array=array('name'=>"zhangsan");
$array3=(object)$array;
echo "<pre>";
print_r($array3);
echo "<pre>";
echo $array3->name;
/* object 直接把里面的转换成object
stdClass Object
(
    [name] => zhangsan
)

zhangsan
 */
//2.
$resultsum=array();
$array=array('name'=>"zhangsan");
$array3=(object)$array;
$array4=(object)array('age'=>"zhangsan");
array_push($resultsum,$array4);
p($resultsum);
 function P($value='')
/* array_push可以拼装对象成数组,但是该对象成为数组里面键值里的对象
Array
(
    [0] => stdClass Object
        (
            [age] => zhangsan
        )

)

 */

}
